package com.zlt.dao;

import com.zlt.dto.JobDTO;
import com.zlt.entity.Company;
import com.zlt.entity.Job;
import com.zlt.entity.JobType;
import com.zlt.entity.User;
import com.zlt.vo.JobVo;
import com.zlt.vo.Pager;

import java.util.List;
import java.util.Map;

public interface JobDao {
    List<JobType> selectAllType(int parentId);

    List<JobType> selectAllTypes(int parentId);

    Long selectCollection(String uid, int jid);//查看是否有收藏记录

    int updateCollection(String uid, int jid,int state);//修改收藏状态

    int insertCollection(String uid, int jid,int state);//插入收藏记录

    Job selectOne(int jid);//查询单个岗位详情

    User selectRecruiter(String uid);//查找岗位的发布者

    Integer collectionState(String uid, int jid);//查看岗位收藏状态

    Long collectionCount(int jid);//查看岗位收藏数量

    Company selectCompany(int cid);//查看岗位所属公司信息

    Job selectJobByJid(Integer jid);//通过jid查找job

    Long collectTotalCount(String uid);//已收藏岗位总条数

    List<Map<String,Object>> allCollectionJob(Pager<JobVo> pager, String uid);//已收藏岗位

    Job selectOneJobByJid(Integer jid);

    Long selectCountJob();

    List<Job> selectAllJob(Pager<JobVo> pager, String uid);

    boolean updateJobState(Integer jid, Integer state);

    Long defaultTotalCount();//岗位总数，时间倒序

    List<Map<String,Object>> defaultAllJob(Pager<JobVo> pager);//默认岗位

    Company selectCidByUid(String uid,Integer state);

    boolean insertJob(Job job);

    JobType selectJobTypeByJid(Integer jtId);

    boolean updateJobInfo(JobDTO jobDTO);


        //
    JobType selectJobTypeByJtid(Integer jtid);

    List<JobType> selectJobTypeByCid(Integer cid);

    List<Job> selectJobByCid(Integer cid);

    Long selectJobCount(StringBuilder countSql, List params);

    List<Job> selectJob(StringBuilder sql, List params, Pager<JobVo> pager);

}
